//
//  AllNodesInScrollView.h
//  NaRiLSVMT
//
//  Created by jmsre on 14-8-20.
//  Copyright (c) 2014年 helloyouth.org. All rights reserved.
//
    //加载下面的流程节点的View
#import <UIKit/UIKit.h>


@class AllNodesInScrollView;

@protocol AllNodesInScrollDelegate <NSObject>

@optional

- (void)HandleNoteButtonLongPressPlay:(id)viewController ButtonID:(NSInteger)buttonIndex RECT:(CGRect) frame;
- (void)HandleTapNodeButton:(id)viewController ButtonIndex:(NSNumber *)num;

- (void)HandleTapButtonForPlay:(id)viewController ButtonIndex:(NSNumber *)num;

- (void)HandlePausePlay:(id)viewController ButtonIndex:(NSNumber *)num;

- (void)HandleFlowControlPausePlay:(id)viewController ButtonIndex:(NSNumber *)num;

@end

@interface AllNodesInScrollView : UIScrollView<UIScrollViewDelegate,UIGestureRecognizerDelegate>
{
    NSArray *nameArray;
    NSInteger userSelectedChannelID;        //点击按钮选择名字ID
    NSInteger scrollViewSelectedChannelID;  //滑动列表选择名字ID
}


Assign  id<AllNodesInScrollDelegate> delagateNodeForTapOrPlay;

Assign  id<AllNodesInScrollDelegate> delagateFlowForTapOrPlay;


@property (nonatomic, retain) NSArray *nameArray;

@property(nonatomic,retain)NSMutableArray *buttonOriginXArray;
@property(nonatomic,retain)NSMutableArray *buttonWithArray;

@property (nonatomic, assign) NSInteger scrollViewSelectedChannelID;


//+ (AllNodesInScrollView *)shareInstance;
/**
 *  加载顶部标签
 */
- (void)initWithNameButtons;
/**
 *  滑动撤销选中按钮
 */
- (void)setButtonUnSelect;
/**
 *  滑动选择按钮
 */
- (void)setButtonSelect;
/**
 *  滑动顶部标签位置适应
 */
-(void)setScrollViewContentOffset;



- (void)onceOrcyclesPlay:(NSMutableArray *)buttonArr StartIndex:(NSInteger)index Interval:(NSInteger)time IsCyclesPlay: (BOOL)flag isPause:(NSInteger)pause;


@property (nonatomic, assign) CGPoint startPoint;
@property (nonatomic, assign) BOOL flipped;
Assign  CGRect  projectViewRect;
Strong  UIView  *pannedView;

Assign  CGFloat   panStartPosition;
Assign  CGFloat   panEndPosition;

//////=======
Assign double dHeight;//scrollView 滚动了多少.

Strong CABasicAnimation *shakeAnimation;//节点动画



@end
